package com.gotop.common.enums;

/**
 * @program: cem
 * @description:
 * @author: superfish
 * @create: 2020-12-30 14:08
 **/
public enum EnumStatus {

    TRUE(1, "是"),
    FALSE(0, "否");

    private int code;
    private String msg;

    EnumStatus(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String desc(Integer code) {
        for (EnumStatus enumState : EnumStatus.values()) {
            if (enumState.code == code) {
                return enumState.msg;
            }
        }
        return "";
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
